//
//  HomeGoodsCollectionViewCell.m
//  share_business
//
//  Created by 吴于凌 on 2017/9/2.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import "HomeGoodsCollectionViewCell.h"

@interface HomeGoodsCollectionViewCell ()

@property(nonatomic,strong)UILabel *labelTitle ;
@property(nonatomic,strong)UILabel *labelDetail ;
@property(nonatomic,strong)UIButton *button ;
@property(nonatomic,strong)UIImageView *imageView ;

@end
@implementation HomeGoodsCollectionViewCell

-(void)setUpView {
    UIView *bgView  = [[UIView alloc]initWithFrame:CGRectMake(10, 10, self.width-20, self.height-20)];
    bgView.backgroundColor = [UIColor colorWithHexString:@"#efefef"];
    [bgView setBorder:1 cornerRadius:0];
    
    UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.width / 2, self.height)];
    [self.contentView addSubview:leftView];
    
    _labelTitle = [BSWidget commonLableWithFrame:CGRectMake(15, 20,leftView.width, 25) text:@"标题" color:RGBA(51, 51, 51, 1) font:19];
    [leftView addSubview:_labelTitle];
    
    _labelDetail = [BSWidget commonLableWithFrame:CGRectMake(15, _labelTitle.maxY,leftView.width, 60) text:@"老友与酒\n悦享生活" color:RGBA(51, 51, 51, 1) font:14];
    _labelDetail.numberOfLines = 2 ;
    [leftView addSubview:_labelDetail];
    
    _button = [BSWidget commonButtonWithFrame:CGRectMake(15, _labelDetail.maxY, 50, 24) title:@"GO >" color:[UIColor whiteColor] fontSize:13 target:self action:@selector(clickGO)];
    [_button setBorder:0 cornerRadius:24/2];
    
    _button.backgroundColor = [UIColor orangeColor];
    _button.userInteractionEnabled =NO ;
    [leftView addSubview:_button];
    
    _imageView = [BSWidget commonImageViewWithFrame:CGRectMake(self.width /2 - 15 , 0, self.width /2 + 15 , bgView.height) image:ImageNamed(@"")];
   
    
    [bgView addSubview:leftView];
    [bgView addSubview:_imageView];
    [self.contentView addSubview:bgView];
}

-(void)clickGO{
    
}
@end
